package com.cloud.animationtestdemo.app

import android.app.Application
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleRegistry
import androidx.lifecycle.ProcessLifecycleOwner
import com.cloud.animationtestdemo.utils.EasyConfigChangeManager
import com.cloud.animationtestdemo.utils.MyActivityLifecycleObserver

/**
 * @author: njb
 * @date:   2024/12/27 23:16
 * @desc:   描述
 */
class EasyApp :Application() {

    override fun onCreate() {
        super.onCreate()
        val observer = MyActivityLifecycleObserver()
        ProcessLifecycleOwner.get().lifecycle.addObserver(observer)
        EasyConfigChangeManager.init(getLifecycle(),this)
    }

     fun getLifecycle(): Lifecycle = ProcessLifecycleOwner.get().lifecycle


}